import Vue from 'vue'
import VueRouter from 'vue-router'

// 引入home页面
import Home from '../views/Home'
// 引入我的
import My from '../views/My'
// 引入榜单页面
import Pound from '../views/Pound'

// 注册路由
Vue.use(VueRouter)

const routes = [
  {
    path: '',
    redirect: '/pound'
  },
  {
    path: '/',
    name: 'Home',
    component: Home,
    children: [
      {
        path: 'pound',
        name: 'Pound',
        component: Pound
      },
      {
        path: 'my',
        name: 'My',
        component: My
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
